#include <iostream>
#include"../Include/myredis++.h"
using std::cin;
using std::cout;
using std::endl;
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &v)
{
if (!v.empty())
{
os << '[';
std::copy(v.begin(), v.end(), std::ostream_iterator<T>(os, ", "));
os << "\b\b]"; // 删除末尾的", "
}
return os;
}
void test01()
{
Myredis rs("tcp://127.0.0.1:6379");
vector<string>values{string("sss"),string("bbb"),string("ccc")};
string key="坚决执行";
rs.rpush(key,values);
rs.get_list(key,values);
for(string& n:values)
cout<<n<<" ";
cout<<endl;
// rs.set_Overdue(key,-2);
values.clear();
for(string& n:values)
cout<<n<<" ";
cout<<endl;
}
int main()
{
   test01();
   return EXIT_SUCCESS;
}
